/* AI起名小程序模块样式 */
.ai-naming-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2rem 0;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #666;
  font-weight: 300;
}

.naming-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.input-section {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.input-group select,
.input-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input-group select:focus,
.input-group input:focus {
  outline: none;
  border-color: #6a11cb;
}

.input-group.full-width {
  grid-column: 1 / -1;
}

.generate-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 1rem;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.loading::after {
  content: '';
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.results-section {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 1rem;
}

.results-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.favorites-count {
  background: #fff3cd;
  color: #856404;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.names-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.name-card {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.name-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #6a11cb;
}

.name-card.favorite {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-color: #ffc107;
}

.name-content {
  margin-bottom: 1rem;
}

.name-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.5rem;
  text-align: center;
}

.name-meaning {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
  text-align: center;
}

.name-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.favorite-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: #e9ecef;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.favorite-btn:hover {
  background: #6a11cb;
  color: white;
  transform: translateY(-2px);
}

.favorite-btn.active {
  background: #ffc107;
  color: #333;
}

.copy-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: #e9ecef;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #2575fc;
  color: white;
  transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-content {
    padding: 0 1rem;
  }

  .naming-section {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
  }

  .content-header {
    margin-bottom: 2rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .input-section,
  .results-section {
    padding: 1.5rem;
  }

  .results-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .names-grid {
    grid-template-columns: 1fr;
  }
}